﻿@using System.Text
@using CTTool.Web.Controllers;

@if (Model is Dictionary<string, StringBuilder>)
{
    foreach (var item in Model)
    {
        <h5>@(item.Key)</h5>
        <dl>
            <dt>@(item.Key).h</dt>
            <dd><pre>@(JsonToObjectCController.GenerateHFileContent(item))</pre></dd>
            <dt>@(item.Key).m</dt>
            <dd><pre>@(JsonToObjectCController.GenerateMFileContent(item))</pre></dd>
        </dl>
    }
}
else if(Model is KeyValuePair<string, StringBuilder>)
{
    <h5>@(Model.Key)</h5>
    <dl>
        <dt>@(Model.Key).h</dt>
        <dd><pre>@(JsonToObjectCController.GenerateHFileContent(Model))</pre></dd>
        <dt>@(Model.Key).m</dt>
        <dd><pre>@(JsonToObjectCController.GenerateMFileContent(Model))</pre></dd>
    </dl>
}
else if(Model is KeyValuePair<string, string>)
{
    <h5>@(Model.Key)</h5>
    <dl>
        <dt>@(Model.Key)</dt>
        <dd><pre>@(Model.Value)</pre></dd>
    </dl>
}
else
{
    <div style="color:red; font-weight:bold;" id="message">错误的Model</div>
}